package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the SOCIAL_ACCOUNT database table.
 * 
 */
@Entity
@Table(name="SOCIAL_ACCOUNT")
@NamedQuery(name="SocialAccount.findAll", query="SELECT s FROM SocialAccount s")
public class SocialAccount implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SOCIAL_ACCOUNT_SOCIALID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SOCIAL_ACCOUNT_SOCIALID_GENERATOR")
	@Column(name="SOCIAL_ID")
	private long socialId;
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@Column(name="SOCIAL_CRETORDATE")
	private Timestamp socialCretordate;
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@Column(name="SOCIAL_ENDATE")
	private Timestamp socialEndate;

	@Column(name="SOCIAL_NAME")
	private String socialName;

	@Column(name="SOCIAL_NUMBER")
	private BigDecimal socialNumber;

	@Column(name="SOCIAL_PERSON")
	private String socialPerson;

	@Column(name="SOCIAL_REMARK")
	private String socialRemark;
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@Column(name="SOCIAL_STARATDATE")
	private Timestamp socialStaratdate;
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@Column(name="SOCIAL_UPDATEDATE")
	private Timestamp socialUpdatedate;

	//bi-directional many-to-one association to SocialSecurity
	@OneToMany(mappedBy="socialAccount")
	@JSONField(serialize=false)
	private List<SocialSecurity> socialSecurities;

	public SocialAccount() {
	}

	public long getSocialId() {
		return this.socialId;
	}

	public void setSocialId(long socialId) {
		this.socialId = socialId;
	}

	public Timestamp getSocialCretordate() {
		return this.socialCretordate;
	}

	public void setSocialCretordate(Timestamp socialCretordate) {
		this.socialCretordate = socialCretordate;
	}

	public Timestamp getSocialEndate() {
		return this.socialEndate;
	}

	public void setSocialEndate(Timestamp socialEndate) {
		this.socialEndate = socialEndate;
	}

	public String getSocialName() {
		return this.socialName;
	}

	public void setSocialName(String socialName) {
		this.socialName = socialName;
	}

	public BigDecimal getSocialNumber() {
		return this.socialNumber;
	}

	public void setSocialNumber(BigDecimal socialNumber) {
		this.socialNumber = socialNumber;
	}

	public String getSocialPerson() {
		return this.socialPerson;
	}

	public void setSocialPerson(String socialPerson) {
		this.socialPerson = socialPerson;
	}

	public String getSocialRemark() {
		return this.socialRemark;
	}

	public void setSocialRemark(String socialRemark) {
		this.socialRemark = socialRemark;
	}

	public Timestamp getSocialStaratdate() {
		return this.socialStaratdate;
	}

	public void setSocialStaratdate(Timestamp socialStaratdate) {
		this.socialStaratdate = socialStaratdate;
	}

	public Timestamp getSocialUpdatedate() {
		return this.socialUpdatedate;
	}

	public void setSocialUpdatedate(Timestamp socialUpdatedate) {
		this.socialUpdatedate = socialUpdatedate;
	}

	public List<SocialSecurity> getSocialSecurities() {
		return this.socialSecurities;
	}

	public void setSocialSecurities(List<SocialSecurity> socialSecurities) {
		this.socialSecurities = socialSecurities;
	}

	public SocialSecurity addSocialSecurity(SocialSecurity socialSecurity) {
		getSocialSecurities().add(socialSecurity);
		socialSecurity.setSocialAccount(this);

		return socialSecurity;
	}

	public SocialSecurity removeSocialSecurity(SocialSecurity socialSecurity) {
		getSocialSecurities().remove(socialSecurity);
		socialSecurity.setSocialAccount(null);

		return socialSecurity;
	}

}